import {
    post,
    get,
    formdataPost
} from '@/assets/api/http';


// 测试接口 首页轮播图
export const getRotationMap = (data, config) => post('/api/index/getRotationMap', data, config);

//双十一活动弹窗是否展示
export const getElevenOpen = (data, config) => post('/api/index/openwindow', data, config);


// 注册
export const pcRegister = (data, config) => post('/api/user/pc_register', data, config);


// 验证码
export const smsSend = (data, config) => post('/api/sms/send', data, config);

// 验证码登录
export const userMobilelogin = (data, config) => post('/api/user/pc_mobilelogin', data, config);

// 手机密码登录
export const userLogin = (data, config) => post('/api/user/pc_login', data, config);

// 找回密码
export const userChangepwd = (data, config) => post('/api/user/changepwd', data, config);

// 获取用户信息
export const userGetUserInfo = (data, config) => post('/api/user/getUserInfo', data, config);

// 获取首页数字
export const getPcShowindex = (data, config) => post('/api/index/pc_showindex', data, config);

// 手机密码登录
export const logout = (data, config) => post('/api/user/logout', data, config);

// 搜索
export const newXungetSearch = (data, config) => post('/api/Index/new_xungetsearch', data, config);

// 检查是否到达上限
export const checkview = (data, config) => post('/api/Policy/checkview', data, config);
export const checkviewNorm = (data, config) => post('/api/Norm/checkview', data, config);
export const checkviewIssue = (data, config) => post('/api/Issue/checkview', data, config);

// 记录日活
export const updatedaylive = (data, config) => post('/api/user/updatedaylive', data, config);

// 注册奖励点击调用
export const getUserActivity = (data, config) => post('/api/user/getUserActivity', data, config);


// 财税江湖问题总统计（新版）
export const addonsnoticeapiindex = (data, config) => post('/addons/notice/api/index', data, config);


// 获取签到
export const new_signlist = (data, config) => post('/api/User/new_signlist', data, config);

// 用户签到
export const new_sign = (data, config) => post('/api/User/new_sign', data, config);

// 用户分析
export const getanalysedata = (data, config) => post('/api/index/add_analysedata', { ...data, url: window.location.pathname + window.location.search }, data, config);

// 用户分析
export const getanalysedata2 = (data, config) => post('/api/index/add_analysedata', { ...data, url: window.location.pathname + window.location.search }, config);

// 上传图片
export const commonUpload = (data, config) => formdataPost('/api/common/upload', data, config);

// 首页数据获取
export const getpcindex_new = (data) => post('/api/index/get_h5_index_new', data);

// 提交意见反馈
export const submitFeedback = (data) => post('/api/user/submitFeedback', data);

// 提交意见反馈
export const getHotSearch = (data) => post('/api/index/getHotSearch', data);

// 生成二维码
export const getAppletCode = (data) => get('/api/wechat/applet_code', data, {
    responseType: 'blod'
});

// 二维码票据检查
export const check_appletcache = (data) => post('/api/user/check_appletcache', data);

// 生成二维码票据
export const make_ticket = (data) => post('/api/wechat/make_ticket', data);

// 获取轮播图
export const getpcslideshow = (data) => post('/api/index/getpcslideshow', data);

// 获取轮播图
export const getfagui_index = (data) => post('/api/index/getfagui_index', data);

// chat-gpt
export const chat_run = (data) => post('/api/index/chat_run', data);


// 获取gpt聊天上下文
export const get_chatmsg = (data) => post('/api/index/get_chatmsg', data);

// 获取后台送的优惠券
export const getwendawindow = (data) => post('/api/user/getwendawindow', data);

// 获取二维码显示页面
export const wxfollowloginCode = (data) => post('/addons/wxfollowlogin/index/index', data);
export const wxfollowloginApi = (data) => post('/addons/wxfollowlogin/api/index', data);
export const get_follow_openid = (data) => post('/addons/wxfollowlogin/api/get_follow_openid', data);
export const follow_login = (data) => post('/api/user/follow_login', data);

export const getCalendarListForMonth = (data) => post('/api/index/getCalendarListForMonth', data);
